﻿using System;
using System.Collections.Generic;
using Algoritmia.DataStructures.Maps;

namespace Algoritmia.DataStructures.PriorityMaps
{
    public class MaxHeapMap<TKey,TValue> : HeapMap<TKey,TValue>
        where TValue : IComparable<TValue>
    {
        public MaxHeapMap(IEnumerable<KeyValuePair<TKey, TValue>> data = null,
            int capacity=0,
            Func<IEnumerable<KeyValuePair<TKey,TValue>>,IMap<TKey,int>> createMap=null,
            Func<IMap<TKey, int>, TKey, IMap<TKey, int>> redimensionMap = null)
            : base(data,capacity,null,
            (kv1,kv2) => kv1.Value.CompareTo(kv2.Value) <= 0 ? 1 : -1 ,createMap,redimensionMap)
        {
        }
    }
}
